// pages/classify/component/custom-select/custom-select.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    text: {
      type: String,
      value: '',
    },
    radioData: {
      type: Array,
      value: [],
    },
    type: {
      type: String,
      value: '',
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    show: false,
    isSelect: false,
  },

  /**
   * 组件的方法列表
   */
  methods: {
    radioChange(e) {
      // console.log('radio->', e);
      let { detail: { value } } = e;
      this.triggerEvent('checkboxchange', {
        type: this.data.type,
        value,
      })
    },
    showBody(e) {
      // console.log('click->', this.data);
      this.setData({
        show: !this.data.show,
        isSelect: !this.data.isSelect,
      });
    }
  }
})
